package top.xiaozhaobk.xiaofenshu.kv.api;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import top.xiaozhaobk.framework.common.response.Response;
import top.xiaozhaobk.xiaofenshu.kv.constant.ApiConstans;
import top.xiaozhaobk.xiaofenshu.kv.dto.req.AddNoteContentReqDTO;
import top.xiaozhaobk.xiaofenshu.kv.dto.req.DeleteNoteContentReqDTO;
import top.xiaozhaobk.xiaofenshu.kv.dto.req.FindNoteContentReqDTO;
import top.xiaozhaobk.xiaofenshu.kv.dto.rsp.FindNoteContentRspDTO;

@FeignClient(value = ApiConstans.SERVICE_NAME)
public interface KeyValueFeignApi {
    String PREfIX = "/kv";

    @PostMapping(PREfIX + "/note/content/add")
    Response<?> addNoteContent(@RequestBody AddNoteContentReqDTO addNoteContentReqDTO);

    @PostMapping(PREfIX + "/note/content/find")
    Response<FindNoteContentRspDTO> findNoteContent(@RequestBody FindNoteContentReqDTO findNoteContentReqDTO);

    @DeleteMapping(PREfIX + "/note/content/delete")
    Response<?> deleteNoteContent(@RequestBody DeleteNoteContentReqDTO deleteNoteContentReqDTO);
}
